import 'dart:convert';
import 'dart:ui';

import 'package:localstorage/localstorage.dart';

import '../page/home/m/note_detail_model.dart';

class GSpUtils {
  static set(String key, String value) {
    localStorage.setItem(key, value);
  }

  static String get(String key) {
    return localStorage.getItem(key) ?? '';
  }

  static remove(String key) {
    localStorage.removeItem(key);
  }

  static const Locale zh = Locale('zh', 'CN');
  static const Locale en = Locale('en', 'US');

  ///默认false 中文
  // static bool getZhEn() {
  //   getStorage ??= GetStorage();
  //   return getStorage!.read(_zh_en_local) ?? false;
  // }

  static const String deviceId = 'deviceId';
  static const String errorLog = 'errorLog';

  ///临时账号，首次自动生成，用于绑定设备和手机号唯一，若无手机号，用临时账号登录
  static const String hasPermission = 'hasPermission';
  static const String nickName = 'nickName';
  static const String tempAccount = 'tempAccount';
  static const String phone = 'phone';
  static const String password = 'password';
  static const String passwordRemember = 'passwordRemember';

  static const String noteList = 'noteList';
  static const String tableConfig = 'tableConfig';
  static const String imageDir = 'imageDir';
}
